<?php
namespace app\api\model;

use think\Model;
use app\api\model\WechatLogin as WechatLoginModel;

class Constructors extends Model
{
    protected $table = 'constructors';

    public function get_user_info($username = null, $pwd = null)
    {
    	if (!$username && !$pwd) {
    		return false;
    	}
        $where = ['username' => $username, 'password' => md5(trim($pwd))];
    	$user_info = $this->where($where)->field('id, name, username, phone, email, last_login')->find();
    	if (isset($user_info)) {
            $user_info = $user_info->toArray();
        }
    	return $user_info;
    }



}